<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class YiJingUpdate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'work_fraction'=>'between:0,5',
            'innovate_fraction'=>'between:0,5',
            'stabilize_fraction'=>'between:0,5',
            'marriage_fraction'=>'between:0,5',
            'fitness_fraction'=>'between:0,5',
            'income_fraction'=>'between:0,5',
            'capacity_fraction'=>'between:0,5',
        ];
    }
    public function messages()
    {
        return [
            'work_fraction.between'=>'打分范围0~5',
            'innovate_fraction.between'=>'打分范围0~5',
            'stabilize_fraction.between'=>'打分范围0~5',
            'marriage_fraction.between'=>'打分范围0~5',
            'fitness_fraction.between'=>'打分范围0~5',
            'income_fraction.between'=>'打分范围0~5',
            'capacity_fraction.between'=>'打分范围0~5',
        ];
    }
}
